<template>
    <el-dialog v-model="diaglogVisible" :title="props.title" :width="props.width">
  <slot></slot>
        <template #footer>
            <div class="dialog-footer">
                <el-button @click="onCancel">取消</el-button>
                <el-button type="primary" @click="onSubmitAbsent">
                    确认
                </el-button>
            </div>
        </template>
    </el-dialog>

</template>

<script setup>
import { ref, reactive,defineModel,defineProps } from 'vue'
let props =defineProps({
    title:{
        type:String,
        default:""
    },
    width:{
        type:String,
        default:"500"
    }
})
let diaglogVisible = defineModel({
    required:true
})
const onCancel = () => {
    emits('cancel')

}
const emits = defineEmits(['cancel','submit'])
const onSubmitAbsent = () => {
    emits('submit')
}
</script>

<style lang="scss" scoped></style>\